(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/components/privacy-modal/index" ], {
    "5ce4": function(e, t, n) {
        (function(e, o) {
            var a = n("4ea4");
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var r = a(n("9523")), i = (a(n("5d2d")), n("26cb"));
            function s(e, t) {
                var n = Object.keys(e);
                if (Object.getOwnPropertySymbols) {
                    var o = Object.getOwnPropertySymbols(e);
                    t && (o = o.filter(function(t) {
                        return Object.getOwnPropertyDescriptor(e, t).enumerable;
                    })), n.push.apply(n, o);
                }
                return n;
            }
            function c(e) {
                for (var t = 1; t < arguments.length; t++) {
                    var n = null != arguments[t] ? arguments[t] : {};
                    t % 2 ? s(Object(n), !0).forEach(function(t) {
                        (0, r.default)(e, t, n[t]);
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : s(Object(n)).forEach(function(t) {
                        Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
                    });
                }
                return e;
            }
            t.default = {
                name: "PrivacyModal",
                props: {
                    pureModal: {
                        type: Boolean,
                        default: !1
                    }
                },
                data: function() {
                    return {
                        isShow: !1
                    };
                },
                computed: (0, i.mapState)({
                    canIUseGetUserProfile: function(e) {
                        return e.user.canIUseGetUserProfile;
                    },
                    hasUserInfo: function(e) {
                        return e.user.hasUserInfo;
                    }
                }),
                methods: c(c(c({}, (0, i.mapMutations)([ "commonUpdate", "setAgreePrvicy", "setPrivacyShown", "setHasUserInfo" ])), (0, 
                i.mapActions)([ "updateUserInfo" ])), {}, {
                    modalClose: function() {
                        this.$emit("hide"), this.hide();
                    },
                    show: function() {
                        this.isShow = !0, this.setPrivacyShown();
                    },
                    hide: function() {
                        this.isShow = !1;
                    },
                    setLogin: function() {
                        var t = this;
                        e.showLoading({
                            title: "登录中",
                            mask: !0
                        }), this.loginWX(function() {
                            t.modalClose(), e.hideLoading();
                        }, !0);
                    },
                    goPrivacy: function() {
                        this.handleLinkRoute(this.app.link.privacy);
                    },
                    agreePrivacy: function() {
                        this.setAgreePrvicy(), this.$emit("agree"), this.hide();
                    },
                    getUserProfile: function() {
                        var e = this;
                        this.lockStatus || (this.lockStatus = !0, o.getUserProfile({
                            desc: "用于完善用户信息资料",
                            success: function(t) {
                                var n = t.userInfo, o = t.iv, a = t.encryptedData;
                                e.handleUpdateUserInfo({
                                    userInfo: n,
                                    iv: o,
                                    encryptedData: a
                                });
                            },
                            fail: function() {
                                e.lockStatus = !1;
                            }
                        }));
                    },
                    handleUpdateUserInfo: function(t) {
                        var n = this, o = t.userInfo, a = t.iv, r = t.encryptedData;
                        e.showLoading({
                            title: "登录中",
                            mask: !0
                        }), this.loginWX(function() {
                            n.setAgreePrvicy(), n.commonUpdate({
                                module: "user",
                                type: "info",
                                value: c(c(c({}, o), n.user), {}, {
                                    nickname: o.nickName,
                                    avatar: o.avatarUrl
                                })
                            }), n.updateUserInfo({
                                open_id: n.user.open_id,
                                nickname: o.nickName,
                                avatar: o.avatarUrl,
                                iv: a,
                                encryptedData: r
                            }), n.setHasUserInfo(!0), n.lockStatus = !1, n.modalClose(), e.hideLoading();
                        });
                    },
                    handleGetUserInfo: function(e) {
                        if (!this.lockStatus) {
                            this.lockStatus = !0;
                            var t = e.detail, n = t.errMsg, o = t.userInfo, a = t.iv, r = t.encryptedData;
                            "getUserInfo:ok" === n ? this.handleUpdateUserInfo({
                                userInfo: o,
                                iv: a,
                                encryptedData: r
                            }) : this.lockStatus = !1;
                        }
                    }
                })
            };
        }).call(this, n("543d").default, n("bc2e").default);
    },
    "5e2e": function(e, t, n) {
        n.d(t, "b", function() {
            return o;
        }), n.d(t, "c", function() {
            return a;
        }), n.d(t, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, a = [];
    },
    "831f": function(e, t, n) {
        n.r(t);
        var o = n("5e2e"), a = n("8b27");
        for (var r in a) [ "default" ].indexOf(r) < 0 && function(e) {
            n.d(t, e, function() {
                return a[e];
            });
        }(r);
        n("391a");
        var i = n("f0c5"), s = Object(i.a)(a.default, o.b, o.c, !1, null, "92287414", null, !1, o.a, void 0);
        t.default = s.exports;
    },
    "8b27": function(e, t, n) {
        n.r(t);
        var o = n("5ce4"), a = n.n(o);
        for (var r in o) [ "default" ].indexOf(r) < 0 && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(r);
        t.default = a.a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/components/privacy-modal/index-create-component", {
    "pages/components/privacy-modal/index-create-component": function(e, t, n) {
        n("543d").createComponent(n("831f"));
    }
}, [ [ "pages/components/privacy-modal/index-create-component" ] ] ]);